package pwd.allen.behavior.iterator;

/**
 * @author 门那粒沙
 * @create 2021-05-22 23:13
 **/
public class Main {
    public static void main(String[] args) {
        ListAggregate<String> aggregate = new ListAggregate<>();
        aggregate.add("RNG");
        aggregate.add("IG");
        aggregate.add("SKT");

        Iterator iterator = aggregate.getIterator();

        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
